Xbasic

a5storage_getitem_as_blob Function

Syntax

b blob = a5Storage_getItem_as_blob(C connectionString ,C itemName [,* pResult ])

Arguments

connectionStringCharacter

Storage connection string with ::storage:: as a prefix.

itemNameCharacter

The name of the item to fetch.

pResultPointer

An optional dot variable that you can pass in that will be populated with information about the object.

Returns

blobBinary

Returns the data downloaded from the item in storage.

Description

Retrieves data from an item in storage, including files stored in Amazon S3 or Azure, and puts the data in a blob variable.

Example

dim b3 as b
dim p3 as p

b3 = a5Storage_getItem_as_blob("::storage::Amazon_East","movies/4290.jpg",p3)
?b3.size()
?p3 
= contentType = "image/jpeg"
timeTakenMilliseconds = 297

To send the file to the client from an Ajax Callback, see a5Helper_generateFileDownloadJS Function. See also Context.Response.SendFile.

See Also